<!DOCTYPE html>


<html lang="en">
  

    <head>
      <meta charset="utf-8" />
        
      <meta
        name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1"
      />
      <title>自制工具：dumpTBLSpaceAndPE.sh |  朝花夕拾</title>
  <meta name="generator" content="hexo-theme-ayer">
      
      <link rel="shortcut icon" href="/ww.ico" />
       
<link rel="stylesheet" href="/dist/main.css">

      
<link rel="stylesheet" href="/css/fonts/remixicon.css">

      
<link rel="stylesheet" href="/css/custom.css">
 
      <script src="https://cdn.staticfile.org/pace/1.2.4/pace.min.js"></script>
       
 

      <link
        rel="stylesheet"
        href="https://cdn.jsdelivr.net/npm/@sweetalert2/theme-bulma@5.0.1/bulma.min.css"
      />
      <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.19/dist/sweetalert2.min.js"></script>

      <!-- mermaid -->
      
      <style>
        .swal2-styled.swal2-confirm {
          font-size: 1.6rem;
        }
      </style>
    </head>
  </html>
</html>


<body>
  <div id="app">
    
      
    <main class="content on">
      <section class="outer">
  <article
  id="post-自制工具：dumpTBLSpaceAndPE-sh"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h1 class="article-title sea-center" style="border-left:0" itemprop="name">
  自制工具：dumpTBLSpaceAndPE.sh
</h1>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/06/15/%E8%87%AA%E5%88%B6%E5%B7%A5%E5%85%B7%EF%BC%9AdumpTBLSpaceAndPE-sh/" class="article-date">
  <time datetime="2023-06-15T12:28:40.000Z" itemprop="datePublished">2023-06-15</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/GBase8s/">GBase8s</a>
  </div>
  
<div class="word_count">
    <span class="post-time">
        <span class="post-meta-item-icon">
            <i class="ri-quill-pen-line"></i>
            <span class="post-meta-item-text"> Word count:</span>
            <span class="post-count">2.4k</span>
        </span>
    </span>

    <span class="post-time">
        &nbsp; | &nbsp;
        <span class="post-meta-item-icon">
            <i class="ri-book-open-line"></i>
            <span class="post-meta-item-text"> Reading time≈</span>
            <span class="post-count">14 min</span>
        </span>
    </span>
</div>
 
    </div>
      
    <div class="tocbot"></div>




  
    <div class="article-entry" itemprop="articleBody">
       
  <h3 id="宕机环境下，导出某个表的pe列表"><a href="#宕机环境下，导出某个表的pe列表" class="headerlink" title="宕机环境下，导出某个表的pe列表"></a>宕机环境下，导出某个表的pe列表</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br></pre></td><td class="code"><pre><span class="line">rm -fr wangweipe</span><br><span class="line">mkdir -p wangweipe</span><br><span class="line">cd wangweipe</span><br><span class="line">export INFORMIXCONTIME=1</span><br><span class="line">export INFORMIXCONRETRY=0</span><br><span class="line">export TMPRINTOFFSETS=1</span><br><span class="line">export GBASEDBTCONTIME=1</span><br><span class="line">export GBASEDBTCONRETRY=0</span><br><span class="line">oncheck -pr &gt; pr</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">处理DBS</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   DBspace number                 10</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   DBspace name                   dbs02</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   Flags                          0x60001    No mirror chunks</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   Number of chunks               4</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   First chunk                    10</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   Pagesize (k)                   2</span></span><br><span class="line">awk &#x27;BEGIN &#123;printf(&quot;\n%-20s%-20s%-20s%-20s%-20s%-20s\n&quot;,&quot;DBspace number&quot;,&quot;DBspace name&quot;,&quot;Flags&quot;,&quot;Number of chunks&quot;,&quot;First chunk&quot;,&quot;Pagesize&quot;)&#125;&#x27; &gt; pr.dbs</span><br><span class="line">cat pr |sed -n &#x27;/Using DBspace page/,/Using primary chunk page/p&#x27; |grep -E &quot;DBspace number|DBspace name|Flags|Number of chunks|First chunk|Pagesize&quot; |awk &#x27;&#123;</span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">0~/DBspace number/)&#123;<span class="built_in">printf</span>(<span class="string">&quot;%-20s&quot;</span>,<span class="variable">$3</span>)&#125;</span></span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">0~/DBspace name/)&#123;<span class="built_in">printf</span>(<span class="string">&quot;%-20s&quot;</span>,<span class="variable">$3</span>)&#125;</span></span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">0~/Flags/)&#123;<span class="built_in">printf</span>(<span class="string">&quot;%-20s&quot;</span>,<span class="variable">$2</span>)&#125;</span></span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">0~/Number of chunks/)&#123;<span class="built_in">printf</span>(<span class="string">&quot;%-20s&quot;</span>,<span class="variable">$4</span>)&#125;</span></span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">0~/First chunk/)&#123;<span class="built_in">printf</span>(<span class="string">&quot;%-20s&quot;</span>,<span class="variable">$3</span>)&#125;</span></span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">0~/Pagesize/)&#123;<span class="built_in">printf</span>(<span class="string">&quot;%-20s\n&quot;</span>,<span class="variable">$3</span>)&#125;</span></span><br><span class="line">&#125;&#x27; &gt;&gt; pr.dbs</span><br><span class="line">cat pr.dbs</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">处理CHUNK</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   Chunk number                   12</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   Flags                          0x10040    Chunk is online</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   Chunk path                     /data/g31/datachk02_3</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   Chunk offset                   0 (p)</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   Chunk size                     5000 (p)</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   Number of free pages           0</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   DBspace number                 10</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">   Next chunk <span class="keyword">in</span> DBspace          13</span></span><br><span class="line">awk &#x27;BEGIN &#123;printf(&quot;\n%-20s%-20s%-50s%-20s%-20s%-20s%-20s\n&quot;,&quot;Chunk number&quot;,&quot;Flags&quot;,&quot;Chunk path&quot;,&quot;Chunk offset&quot;,&quot;Chunk size&quot;,&quot;Number of free page&quot;,&quot;DBspace number&quot;,&quot;Next chunk in DBspace&quot;)&#125;&#x27; &gt; pr.chunk</span><br><span class="line">cat pr |sed -n &#x27;/Using primary chunk page/,/Using archive page/p&#x27; |grep -E &quot;Chunk number|Flags|Chunk path|Chunk offset|Chunk size|Number of free pages|DBspace number|Next chunk in DBspace&quot; |awk &#x27;&#123;</span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">0~/Chunk number/)&#123;<span class="built_in">printf</span>(<span class="string">&quot;%-20s&quot;</span>,<span class="variable">$3</span>)&#125;</span></span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">0~/Flags/)&#123;<span class="built_in">printf</span>(<span class="string">&quot;%-20s&quot;</span>,<span class="variable">$2</span>)&#125;</span></span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">0~/Chunk path/)&#123;<span class="built_in">printf</span>(<span class="string">&quot;%-50s&quot;</span>,<span class="variable">$3</span>)&#125;</span></span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">0~/Chunk offset/)&#123;<span class="built_in">printf</span>(<span class="string">&quot;%-20s&quot;</span>,<span class="variable">$3</span>)&#125;</span></span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">0~/Chunk size/)&#123;<span class="built_in">printf</span>(<span class="string">&quot;%-20s&quot;</span>,<span class="variable">$3</span>)&#125;</span></span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">0~/Number of free pages/)&#123;<span class="built_in">printf</span>(<span class="string">&quot;%-20s&quot;</span>,<span class="variable">$5</span>)&#125;</span></span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">0~/DBspace number/)&#123;<span class="built_in">printf</span>(<span class="string">&quot;%-20s\n&quot;</span>,<span class="variable">$3</span>)&#125;</span></span><br><span class="line">&#125;&#x27; &gt;&gt; pr.chunk</span><br><span class="line">cat pr.chunk</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">处理DBS的槽位</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">dumpDBS的TBL的extent_t的槽位：</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">DBSNAME=datadbs01</span></span><br><span class="line">echo &quot;请输入dbs名称：&quot;</span><br><span class="line">read DBSNAME</span><br><span class="line">OUT=dd.dbs.p4</span><br><span class="line">OUT2=dd.dbs.p4.slot5</span><br><span class="line">OUT3=dd.dbs.extents</span><br><span class="line">DBSPageS=$(cat pr.dbs|awk -v n=$DBSNAME &#x27;&#123;if($2==n) &#123;print $NF&#125;&#125;&#x27;)</span><br><span class="line">RTSPageS=$(cat pr.dbs|awk -v n=&quot;rootdbs&quot; &#x27;&#123;if($2==n) &#123;print $NF&#125;&#125;&#x27;)</span><br><span class="line">DBSID=$(cat pr.dbs|awk -v n=$DBSNAME &#x27;&#123;if($2==n) &#123;print $5&#125;&#125;&#x27;)</span><br><span class="line">DBSPS=$(cat pr.dbs|awk -v n=$DBSNAME &#x27;&#123;if($2==n) &#123;print $NF*1024&#125;&#125;&#x27;)</span><br><span class="line">DBSPATH=$(cat pr.chunk| awk -v id=$DBSID &#x27;$1==id &#123;print $3&#125;&#x27;)</span><br><span class="line">DBSPATHOFFSET=$(cat pr.chunk| awk -v id=$DBSID &#x27;$1==id &#123;print $4*1024&#125;&#x27;)</span><br><span class="line">let SKIPByte=$DBSPS*4+$DBSPATHOFFSET</span><br><span class="line">if [ $DBSNAME == &quot;rootdbs&quot; ]; then</span><br><span class="line">	let SKIPByte=$DBSPS*14+$DBSPATHOFFSET</span><br><span class="line">fi</span><br><span class="line">dd if=$DBSPATH of=$OUT skip=$SKIPByte bs=1 count=$DBSPS</span><br><span class="line">BEGIND=$(xxd $OUT |tail -2 |head -1|awk &#x27;&#123;print $6&#125;&#x27;|cut -c 1,2)</span><br><span class="line">BEGING=$(xxd $OUT |tail -2 |head -1|awk &#x27;&#123;print $6&#125;&#x27;|cut -c 3,4)</span><br><span class="line">BEGINs=&quot;0x$&#123;BEGING&#125;$&#123;BEGIND&#125;&quot;</span><br><span class="line">LEND=$(xxd $OUT |tail -2 |head -1|awk &#x27;&#123;print $7&#125;&#x27;|cut -c 1,2)</span><br><span class="line">LENG=$(xxd $OUT |tail -2 |head -1|awk &#x27;&#123;print $7&#125;&#x27;|cut -c 3,4)</span><br><span class="line">LENs=&quot;0x$&#123;LENG&#125;$&#123;LEND&#125;&quot;</span><br><span class="line">BEGIN=$(printf &quot;%d&quot; $BEGINs)</span><br><span class="line">LEN=$(printf &quot;%d&quot; $LENs)</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">dumpDBS的TBL的slot5内容：</span></span><br><span class="line">dd if=$OUT of=$OUT2 skip=$BEGIN bs=1 count=$LEN</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">10个一分,打印extent： 4len 2chunk 4begin</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash"><span class="variable">$OUT3</span></span></span><br><span class="line">i=0</span><br><span class="line">let count=($LEN-10)/10</span><br><span class="line">while [ $i -lt $count ]</span><br><span class="line">do</span><br><span class="line">	let sk=$i*10+4</span><br><span class="line">	dd if=$OUT2 of=$&#123;OUT2&#125;.$&#123;i&#125; skip=$sk bs=1 count=10</span><br><span class="line">	pchunk=$(xxd $&#123;OUT2&#125;.$&#123;i&#125; |awk &#x27;&#123;printf(&quot;%s%s&quot;,&quot;0x&quot;,$2)&#125;&#x27;)</span><br><span class="line">	pbegin=$(xxd $&#123;OUT2&#125;.$&#123;i&#125; |awk &#x27;&#123;printf(&quot;%s%s%s&quot;,&quot;0x&quot;,$3,$4)&#125;&#x27;)</span><br><span class="line">	plen=$(xxd $&#123;OUT2&#125;.$&#123;i&#125; |awk &#x27;&#123;printf(&quot;%s%s%s&quot;,&quot;0x&quot;,$5,$6)&#125;&#x27;)</span><br><span class="line">	pchunkd=$(printf &quot;%d&quot; $pchunk)</span><br><span class="line">	pbegind=$(printf &quot;%d&quot; $pbegin)</span><br><span class="line">	plend=$(printf &quot;%d&quot; $plen)</span><br><span class="line">	DBSPATHC=$(cat pr.chunk| awk -v id=$pchunkd &#x27;$1==id &#123;print $3&#125;&#x27;)</span><br><span class="line">	echo $pchunk $pbegin $plen $pchunkd $pbegind $plend $DBSPageS $DBSPATHC &gt;&gt; $OUT3</span><br><span class="line">	let i=$i+1</span><br><span class="line">done</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="built_in">cat</span> <span class="variable">$OUT3</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">加工一下OUT3，2k页/10进制bgein/10进制len</span> </span><br><span class="line">echo $DBSPageS  $RTSPageS</span><br><span class="line">cat $OUT3 |awk -v oc=0 -v DPS=$DBSPageS  -v RPS=$RTSPageS &#x27;&#123;</span><br><span class="line">	printf(&quot;%12s %12s %12s %12d %12d %12d %10d %s\n&quot;,$1,$2,$3,$4,$5/(DPS/RPS),$6-oc,$7,$8)</span><br><span class="line">	oc=$6</span><br><span class="line">&#125;&#x27; &gt; tmpfile</span><br><span class="line">mv tmpfile $OUT3</span><br><span class="line">cat $OUT3</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">我搞懂了slot5的内容了：</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">1、前面4个字节不要</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">2、10个字节一份（2chunk，4beging，4len汇总）</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">3、后面6个字节不要</span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">处理以oncheck-pe格式输出</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">DBSNAME=datadbs01</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">OUT3=dd.dbs.extents</span></span><br><span class="line">chunknew=&quot;new&quot;</span><br><span class="line">privchunk=0</span><br><span class="line">cat $OUT3 | while read xc xb xl chunk begin len pagesize path</span><br><span class="line">do</span><br><span class="line"></span><br><span class="line">if [ $&#123;chunk&#125; -eq  $&#123;privchunk&#125; ] ; then</span><br><span class="line">	chunknew=&quot;old&quot;</span><br><span class="line">else </span><br><span class="line">	chunknew=&quot;new&quot;</span><br><span class="line">	privchunk=$chunk</span><br><span class="line">fi</span><br><span class="line"></span><br><span class="line">if [ $chunknew == &quot;new&quot; ] ; then</span><br><span class="line">echo &quot;&quot;</span><br><span class="line">echo &quot;&quot;</span><br><span class="line">echo &quot;DBspace Usage Report: $DBSNAME           Owner: wangwei  Created: 05/09/2022&quot;</span><br><span class="line">echo &quot;&quot;</span><br><span class="line">echo &quot;&quot;</span><br><span class="line">echo &quot; Chunk Pathname                             Pagesize(k)  Size(p)  Used(p)  Free(p)&quot;</span><br><span class="line">echo &quot;     $&#123;chunk&#125; $&#123;path&#125;                           $&#123;pagesize&#125;   xxxxx     xxxxx   xxxxx&quot;</span><br><span class="line">echo &quot;&quot;</span><br><span class="line">echo &quot; Description                                                   Offset(p)  Size(p)&quot;</span><br><span class="line">echo &quot; ------------------------------------------------------------- -------- --------&quot;</span><br><span class="line">echo &quot; RESERVED PAGES                                                       0        2&quot;</span><br><span class="line">echo &quot; CHUNK FREELIST PAGE                                                  2        1&quot;</span><br><span class="line">fi</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="built_in">echo</span> <span class="string">&quot; datadbs01:TBLSpace                                            <span class="variable">$begin</span>       <span class="variable">$len</span>&quot;</span></span></span><br><span class="line">awk -v b=$begin -v l=$len -v pt=&quot;$&#123;DBSNAME&#125;:TBLSpace&quot; &#x27;BEGIN &#123;printf(&quot; %-61s %8d %8d\n&quot;,pt,b,l)&#125;&#x27;</span><br><span class="line"></span><br><span class="line">done &gt; $&#123;DBSNAME&#125;&quot;:TBLSpace&quot;.pe</span><br><span class="line">cat $&#123;DBSNAME&#125;&quot;:TBLSpace&quot;.pe</span><br><span class="line"></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">处理 dump所有partation页</span></span><br><span class="line">OUT3=dd.dbs.extents</span><br><span class="line">ddonepage()&#123;</span><br><span class="line"><span class="meta prompt_">	#</span><span class="language-bash">RuCan: path begin pagesize outdir</span></span><br><span class="line">	outdir=$(printf &quot;%s%03x&quot; &quot;0x&quot; $chunk)</span><br><span class="line">	outfil=$(printf &quot;%s%08x&quot; &quot;0x&quot; $begin)</span><br><span class="line">	let pages=$&#123;pagesize&#125;*1024</span><br><span class="line">	echo &quot;dd if=$path of=$&#123;outdir&#125;/$&#123;outfil&#125; skip=$begin bs=$pages count=1&quot;</span><br><span class="line">	dd if=$path of=$&#123;outdir&#125;/$&#123;outfil&#125; skip=$begin bs=$pages count=1 2&gt;/dev/null</span><br><span class="line">&#125;</span><br><span class="line">cat $OUT3 | while read xc xb xl chunk begin len pagesize path</span><br><span class="line">do</span><br><span class="line">	outdir=$(printf &quot;%s%03x&quot; &quot;0x&quot; $chunk)</span><br><span class="line">	rm -fr $outdir</span><br><span class="line">	mkdir -p $outdir</span><br><span class="line">done</span><br><span class="line">cat $OUT3 | while read xc xb xl chunk begin len pagesize path</span><br><span class="line">do</span><br><span class="line">	i=0</span><br><span class="line">	while [ $i -lt $len ]; do</span><br><span class="line">		ddonepage</span><br><span class="line">		let i=$i+1</span><br><span class="line">		let begin=$begin+1</span><br><span class="line">	done</span><br><span class="line">done</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">xxd 0x008/0x00000003 |grep <span class="string">&quot;b0: &quot;</span>|grep -v <span class="string">&quot;0000 0000 0000 0000 0000 0000 0000 0000&quot;</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">xxd 0x008/0x00000109 |grep <span class="string">&quot;b0: &quot;</span>|grep -v <span class="string">&quot;0000 0000 0000 0000 0000 0000 0000 0000&quot;</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">xxd 0x008/0x000002d7 |grep <span class="string">&quot;a0: &quot;</span>|grep -v <span class="string">&quot;0000 0000 0000 0000 0000 0000 0000 0000&quot;</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">xxd 0x008/0x00000587 |grep <span class="string">&quot;b0: &quot;</span>|grep -v <span class="string">&quot;0000 0000 0000 0000 0000 0000 0000 0000&quot;</span></span></span><br><span class="line"></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">dump目标表partation页 db01:t1</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">这个程序没必要写成自动的，不划算！(其实也可以写成自动，把00000a0:和00000b0:的字段一合并就行了)</span></span><br><span class="line">cd ../  ##此时在dd</span><br><span class="line">partationdir=partationDIR</span><br><span class="line">rm -fr $&#123;partationdir&#125;</span><br><span class="line">mkdir -p $&#123;partationdir&#125;</span><br><span class="line">echo &quot;请输入你要抢救数据的表所在的数据库名称：&quot;</span><br><span class="line">read dbname</span><br><span class="line">echo &quot;请输入你要抢救数据的表名称：&quot;</span><br><span class="line">read tbname</span><br><span class="line">ls -ld wangweipe/0x* |awk &#x27;&#123;print $NF&#125;&#x27; |while read dir</span><br><span class="line">do</span><br><span class="line">	cd $dir</span><br><span class="line">	ls -l 0x* |awk &#x27;&#123;print $NF&#125;&#x27;  |while read file</span><br><span class="line">    do</span><br><span class="line">    	xxd -c 256 $file|head -1|grep &quot;$&#123;dbname&#125;\..*\.$&#123;tbname&#125;\.&quot;</span><br><span class="line">    	if [ $? == 0 ] ;then</span><br><span class="line">    		cp $&#123;file&#125; ../../$&#123;partationdir&#125;/$&#123;file&#125;</span><br><span class="line">    		echo &quot;这个文件就是你要找的partation页！！！  $&#123;partationdir&#125;/$&#123;file&#125;&quot;</span><br><span class="line">			echo &quot;$&#123;dbname&#125;:$&#123;tbname&#125; $&#123;file&#125;&quot; &gt;&gt; ../../$&#123;partationdir&#125;/list.index</span><br><span class="line">    	fi</span><br><span class="line">	done</span><br><span class="line">	cd ../../</span><br><span class="line">done</span><br><span class="line"></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">dumpDBS的TBL的extent_t的槽位： 0保留 1保留 2ChunkFree 3TBLSpaceBitmap （所以要跳过4页）</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">dumpTable时（begin后面加1页(bitmap)即可,算了不跳，保留bitmap）</span></span><br><span class="line">cd wangweipe</span><br><span class="line">OUT4=dd.tab.p.extents.ALL</span><br><span class="line"><span class="meta prompt_">&gt;</span><span class="language-bash"><span class="variable">$OUT4</span></span></span><br><span class="line">ls -l ../$&#123;partationdir&#125;/0x* |awk &#x27;&#123;print $NF&#125;&#x27; |while read filepath</span><br><span class="line">do</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">DBSNAME=datadbs01</span></span><br><span class="line">OUT=$filepath</span><br><span class="line">OUT2=dd.tab.p.slot5</span><br><span class="line">OUT3=dd.tab.p.extents</span><br><span class="line"><span class="meta prompt_">&gt;</span><span class="language-bash"><span class="variable">$OUT2</span></span></span><br><span class="line"><span class="meta prompt_">&gt;</span><span class="language-bash"><span class="variable">$OUT3</span></span></span><br><span class="line">DBSPageS=$(cat pr.dbs|awk -v n=$DBSNAME &#x27;&#123;if($2==n) &#123;print $NF&#125;&#125;&#x27;)</span><br><span class="line">RTSPageS=$(cat pr.dbs|awk -v n=&quot;rootdbs&quot; &#x27;&#123;if($2==n) &#123;print $NF&#125;&#125;&#x27;)</span><br><span class="line">DBSID=$(cat pr.dbs|awk -v n=$DBSNAME &#x27;&#123;if($2==n) &#123;print $5&#125;&#125;&#x27;)</span><br><span class="line">DBSPS=$(cat pr.dbs|awk -v n=$DBSNAME &#x27;&#123;if($2==n) &#123;print $NF*1024&#125;&#125;&#x27;)</span><br><span class="line">DBSPATH=$(cat pr.chunk| awk -v id=$DBSID &#x27;$1==id &#123;print $3&#125;&#x27;)</span><br><span class="line">DBSPATHOFFSET=$(cat pr.chunk| awk -v id=$DBSID &#x27;$1==id &#123;print $4*1024&#125;&#x27;)</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="built_in">let</span> SKIPByte=<span class="variable">$DBSPS</span>*4+<span class="variable">$DBSPATHOFFSET</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="keyword">if</span> [ <span class="variable">$DBSNAME</span> == <span class="string">&quot;rootdbs&quot;</span> ]; <span class="keyword">then</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">	<span class="built_in">let</span> SKIPByte=<span class="variable">$DBSPS</span>*14+<span class="variable">$DBSPATHOFFSET</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="keyword">fi</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="built_in">dd</span> <span class="keyword">if</span>=<span class="variable">$DBSPATH</span> of=<span class="variable">$OUT</span> skip=<span class="variable">$SKIPByte</span> bs=1 count=<span class="variable">$DBSPS</span></span></span><br><span class="line">BEGIND=$(xxd $OUT |tail -2 |head -1|awk &#x27;&#123;print $6&#125;&#x27;|cut -c 1,2)</span><br><span class="line">BEGING=$(xxd $OUT |tail -2 |head -1|awk &#x27;&#123;print $6&#125;&#x27;|cut -c 3,4)</span><br><span class="line">BEGINs=&quot;0x$&#123;BEGING&#125;$&#123;BEGIND&#125;&quot;</span><br><span class="line">LEND=$(xxd $OUT |tail -2 |head -1|awk &#x27;&#123;print $7&#125;&#x27;|cut -c 1,2)</span><br><span class="line">LENG=$(xxd $OUT |tail -2 |head -1|awk &#x27;&#123;print $7&#125;&#x27;|cut -c 3,4)</span><br><span class="line">LENs=&quot;0x$&#123;LENG&#125;$&#123;LEND&#125;&quot;</span><br><span class="line">BEGIN=$(printf &quot;%d&quot; $BEGINs)</span><br><span class="line">LEN=$(printf &quot;%d&quot; $LENs)</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">dumpDBS的TBL的slot5内容：</span></span><br><span class="line">dd if=$OUT of=$OUT2 skip=$BEGIN bs=1 count=$LEN</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">10个一分,打印extent： 4len 2chunk 4begin</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash"><span class="variable">$OUT3</span></span></span><br><span class="line">i=0</span><br><span class="line">let count=($LEN-10)/10</span><br><span class="line">while [ $i -lt $count ]</span><br><span class="line">do</span><br><span class="line">	let sk=$i*10+4</span><br><span class="line">	dd if=$OUT2 of=$&#123;OUT2&#125;.$&#123;i&#125; skip=$sk bs=1 count=10</span><br><span class="line">	pchunk=$(xxd $&#123;OUT2&#125;.$&#123;i&#125; |awk &#x27;&#123;printf(&quot;%s%s&quot;,&quot;0x&quot;,$2)&#125;&#x27;)</span><br><span class="line">	pbegin=$(xxd $&#123;OUT2&#125;.$&#123;i&#125; |awk &#x27;&#123;printf(&quot;%s%s%s&quot;,&quot;0x&quot;,$3,$4)&#125;&#x27;)</span><br><span class="line">	plen=$(xxd $&#123;OUT2&#125;.$&#123;i&#125; |awk &#x27;&#123;printf(&quot;%s%s%s&quot;,&quot;0x&quot;,$5,$6)&#125;&#x27;)</span><br><span class="line">	pchunkd=$(printf &quot;%d&quot; $pchunk)</span><br><span class="line">	pbegind=$(printf &quot;%d&quot; $pbegin)</span><br><span class="line">	plend=$(printf &quot;%d&quot; $plen)</span><br><span class="line">	DBSPATHC=$(cat pr.chunk| awk -v id=$pchunkd &#x27;$1==id &#123;print $3&#125;&#x27;)</span><br><span class="line">	echo $pchunk $pbegin $plen $pchunkd $pbegind $plend $DBSPageS $DBSPATHC &gt;&gt; $OUT3</span><br><span class="line">	let i=$i+1</span><br><span class="line">done</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="built_in">cat</span> <span class="variable">$OUT3</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">加工一下OUT3，2k页/10进制bgein/10进制len</span> </span><br><span class="line">echo $DBSPageS  $RTSPageS</span><br><span class="line">cat $OUT3 |awk -v oc=0 -v DPS=$DBSPageS  -v RPS=$RTSPageS &#x27;&#123;</span><br><span class="line">	printf(&quot;%12s %12s %12s %12d %12d %12d %10d %s\n&quot;,$1,$2,$3,$4,$5/(DPS/RPS),$6-oc,$7,$8)</span><br><span class="line">	oc=$6</span><br><span class="line">&#125;&#x27; &gt; tmpfile</span><br><span class="line">mv tmpfile $OUT3</span><br><span class="line">cat $OUT3 &gt;&gt; $OUT4 </span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">我搞懂了slot5的内容了：</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">1、前面4个字节不要</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">2、10个字节一分（2chunk，4beging，4len汇总）</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">3、后面6个字节不要</span></span><br><span class="line">done</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">处理以oncheck-pe格式输出</span></span><br><span class="line">DBSNAME=$dbname</span><br><span class="line">TABNAME=$tbname</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">OUT3=dd.tab.p.extents</span></span><br><span class="line">chunknew=&quot;new&quot;</span><br><span class="line">privchunk=0</span><br><span class="line">cat $OUT4 | while read xc xb xl chunk begin len pagesize path</span><br><span class="line">do</span><br><span class="line"></span><br><span class="line">if [ $&#123;chunk&#125; -eq  $&#123;privchunk&#125; ] ; then</span><br><span class="line">	chunknew=&quot;old&quot;</span><br><span class="line">else </span><br><span class="line">	chunknew=&quot;new&quot;</span><br><span class="line">	privchunk=$chunk</span><br><span class="line">fi</span><br><span class="line"></span><br><span class="line">if [ $chunknew == &quot;new&quot; ] ; then</span><br><span class="line">echo &quot;&quot;</span><br><span class="line">echo &quot;&quot;</span><br><span class="line">echo &quot;DBspace Usage Report: $DBSNAME           Owner: wangwei  Created: 05/09/2022&quot;</span><br><span class="line">echo &quot;&quot;</span><br><span class="line">echo &quot;&quot;</span><br><span class="line">echo &quot; Chunk Pathname                             Pagesize(k)  Size(p)  Used(p)  Free(p)&quot;</span><br><span class="line">echo &quot;     $&#123;chunk&#125; $&#123;path&#125;                           $&#123;pagesize&#125;   xxxxx     xxxxx   xxxxx&quot;</span><br><span class="line">echo &quot;&quot;</span><br><span class="line">echo &quot; Description                                                   Offset(p)  Size(p)&quot;</span><br><span class="line">echo &quot; ------------------------------------------------------------- -------- --------&quot;</span><br><span class="line">echo &quot; RESERVED PAGES                                                       0        2&quot;</span><br><span class="line">echo &quot; CHUNK FREELIST PAGE                                                  2        1&quot;</span><br><span class="line">fi</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="built_in">echo</span> <span class="string">&quot; datadbs01:TBLSpace                                            <span class="variable">$begin</span>       <span class="variable">$len</span>&quot;</span></span></span><br><span class="line">awk -v b=$begin -v l=$len -v pt=&quot;$&#123;DBSNAME&#125;:$&#123;TABNAME&#125;&quot; &#x27;BEGIN &#123;printf(&quot; %-61s %8d %8d\n&quot;,pt,b,l)&#125;&#x27;</span><br><span class="line"></span><br><span class="line">done &gt; &quot;$&#123;DBSNAME&#125;:$&#123;TABNAME&#125;.pe&quot;</span><br><span class="line">echo &quot;&quot; &gt;&gt; &quot;$&#123;DBSNAME&#125;:$&#123;TABNAME&#125;.pe&quot;</span><br><span class="line">cat &quot;$&#123;DBSNAME&#125;:$&#123;TABNAME&#125;.pe&quot;</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="built_in">cp</span> <span class="string">&quot;<span class="variable">$&#123;DBSNAME&#125;</span>:<span class="variable">$&#123;TABNAME&#125;</span>.pe&quot;</span> /root/c/dumpTable/.pe.log</span></span><br><span class="line"></span><br><span class="line">cp &quot;$&#123;DBSNAME&#125;:$&#123;TABNAME&#125;.pe&quot; ../</span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>

 
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <div class="declare">
      <ul class="post-copyright">
        <li>
          <i class="ri-copyright-line"></i>
          <strong>Copyright： </strong>
          
          Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
          
        </li>
      </ul>
    </div>
    
    <footer class="article-footer">
       
<div class="share-btn">
      <span class="share-sns share-outer">
        <i class="ri-share-forward-line"></i>
        分享
      </span>
      <div class="share-wrap">
        <i class="arrow"></i>
        <div class="share-icons">
          
          <a class="weibo share-sns" href="javascript:;" data-type="weibo">
            <i class="ri-weibo-fill"></i>
          </a>
          <a class="weixin share-sns wxFab" href="javascript:;" data-type="weixin">
            <i class="ri-wechat-fill"></i>
          </a>
          <a class="qq share-sns" href="javascript:;" data-type="qq">
            <i class="ri-qq-fill"></i>
          </a>
          <a class="douban share-sns" href="javascript:;" data-type="douban">
            <i class="ri-douban-line"></i>
          </a>
          <!-- <a class="qzone share-sns" href="javascript:;" data-type="qzone">
            <i class="icon icon-qzone"></i>
          </a> -->
          
          <a class="facebook share-sns" href="javascript:;" data-type="facebook">
            <i class="ri-facebook-circle-fill"></i>
          </a>
          <a class="twitter share-sns" href="javascript:;" data-type="twitter">
            <i class="ri-twitter-fill"></i>
          </a>
          <a class="google share-sns" href="javascript:;" data-type="google">
            <i class="ri-google-fill"></i>
          </a>
        </div>
      </div>
</div>

<div class="wx-share-modal">
    <a class="modal-close" href="javascript:;"><i class="ri-close-circle-line"></i></a>
    <p>扫一扫，分享到微信</p>
    <div class="wx-qrcode">
      <img src="//api.qrserver.com/v1/create-qr-code/?size=150x150&data=http://example.com/2023/06/15/%E8%87%AA%E5%88%B6%E5%B7%A5%E5%85%B7%EF%BC%9AdumpTBLSpaceAndPE-sh/" alt="微信分享二维码">
    </div>
</div>

<div id="share-mask"></div>  
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/GBase8s/" rel="tag">GBase8s</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/level3/" rel="tag">level3</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E8%87%AA%E7%A0%94/" rel="tag">自研</a></li></ul>

    </footer>
  </div>

   
  <nav class="article-nav">
    
      <a href="/2023/06/15/%E8%87%AA%E5%88%B6%E5%B7%A5%E5%85%B7%EF%BC%9AdumpPEpage-sh/" class="article-nav-link">
        <strong class="article-nav-caption">上一篇</strong>
        <div class="article-nav-title">
          
            自制工具：dumpPEpage.sh
          
        </div>
      </a>
    
    
      <a href="/2023/06/15/%E6%9C%80%E6%96%B0%E7%89%88%E6%9C%ACKeepalivedGBase8s-leopard-%E7%8C%8E%E8%B1%B9%E7%89%88/" class="article-nav-link">
        <strong class="article-nav-caption">下一篇</strong>
        <div class="article-nav-title">最新版本KeepalivedGBase8s(leopard)猎豹版</div>
      </a>
    
  </nav>

  
   
  
    
</article>

</section>
      <footer class="footer">
  <div class="outer">
    <ul>
      <li>
        Copyrights &copy;
        2023-2024
        <i class="ri-heart-fill heart_icon"></i> Wang Wei
      </li>
    </ul>
    <ul>
      <li>
        
      </li>
    </ul>
    <ul>
      <li>
        
        
        <span>
  <span><i class="ri-user-3-fill"></i>Visitors:<span id="busuanzi_value_site_uv"></span></span>
  <span class="division">|</span>
  <span><i class="ri-eye-fill"></i>Views:<span id="busuanzi_value_page_pv"></span></span>
</span>
        
      </li>
    </ul>
    <ul>
      
    </ul>
    <ul>
      
    </ul>
    <ul>
      <li>
        <!-- cnzz统计 -->
        
      </li>
    </ul>
  </div>
</footer>    
    </main>
    <div class="float_btns">
      <div class="totop" id="totop">
  <i class="ri-arrow-up-line"></i>
</div>

    </div>
    <aside class="sidebar on">
      <button class="navbar-toggle"></button>
<nav class="navbar">
  
  <div class="logo">
    <a href="/"><img src="/images/ww.ico" alt="朝花夕拾"></a>
  </div>
  
  <ul class="nav nav-main">
    
    <li class="nav-item">
      <a class="nav-item-link" href="/">主页</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/archives">归档</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/categories">分类</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags">标签</a>
    </li>
    
  </ul>
</nav>
<nav class="navbar navbar-bottom">
  <ul class="nav">
    <li class="nav-item">
      
      <a class="nav-item-link nav-item-search"  title="Search">
        <i class="ri-search-line"></i>
      </a>
      
      
    </li>
  </ul>
</nav>
<div class="search-form-wrap">
  <div class="local-search local-search-plugin">
  <input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
  <div id="local-search-result" class="local-search-result"></div>
</div>
</div>
    </aside>
    <div id="mask"></div>

<!-- #reward -->
<div id="reward">
  <span class="close"><i class="ri-close-line"></i></span>
  <p class="reward-p"><i class="ri-cup-line"></i>请我喝杯咖啡吧~</p>
  <div class="reward-box">
    
    <div class="reward-item">
      <img class="reward-img" src="/images/alipay.jpg">
      <span class="reward-type">支付宝</span>
    </div>
    
    
    <div class="reward-item">
      <img class="reward-img" src="/images/wechat.jpg">
      <span class="reward-type">微信</span>
    </div>
    
  </div>
</div>
    
<script src="/js/jquery-3.6.0.min.js"></script>
 
<script src="/js/lazyload.min.js"></script>

<!-- Tocbot -->
 
<script src="/js/tocbot.min.js"></script>

<script>
  tocbot.init({
    tocSelector: ".tocbot",
    contentSelector: ".article-entry",
    headingSelector: "h1, h2, h3, h4, h5, h6",
    hasInnerContainers: true,
    scrollSmooth: true,
    scrollContainer: "main",
    positionFixedSelector: ".tocbot",
    positionFixedClass: "is-position-fixed",
    fixedSidebarOffset: "auto",
  });
</script>

<script src="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.js"></script>
<link
  rel="stylesheet"
  href="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.css"
/>
<script src="https://cdn.staticfile.org/justifiedGallery/3.8.1/js/jquery.justifiedGallery.min.js"></script>

<script src="/dist/main.js"></script>

<!-- ImageViewer -->

<!-- MathJax -->

<!-- Katex -->

<!-- busuanzi  -->
 
<script src="/js/busuanzi-2.3.pure.min.js"></script>
 
<!-- ClickLove -->

<!-- ClickBoom1 -->

<!-- ClickBoom2 -->

<!-- CodeCopy -->
 
<link rel="stylesheet" href="/css/clipboard.css">
 <script src="https://cdn.staticfile.org/clipboard.js/2.0.10/clipboard.min.js"></script>
<script>
  function wait(callback, seconds) {
    var timelag = null;
    timelag = window.setTimeout(callback, seconds);
  }
  !function (e, t, a) {
    var initCopyCode = function(){
      var copyHtml = '';
      copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
      copyHtml += '<i class="ri-file-copy-2-line"></i><span>COPY</span>';
      copyHtml += '</button>';
      $(".highlight .code pre").before(copyHtml);
      $(".article pre code").before(copyHtml);
      var clipboard = new ClipboardJS('.btn-copy', {
        target: function(trigger) {
          return trigger.nextElementSibling;
        }
      });
      clipboard.on('success', function(e) {
        let $btn = $(e.trigger);
        $btn.addClass('copied');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-checkbox-circle-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPIED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-checkbox-circle-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
      clipboard.on('error', function(e) {
        e.clearSelection();
        let $btn = $(e.trigger);
        $btn.addClass('copy-failed');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-time-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPY FAILED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-time-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
    }
    initCopyCode();
  }(window, document);
</script>
 
<!-- CanvasBackground -->

<script>
  if (window.mermaid) {
    mermaid.initialize({ theme: "forest" });
  }
</script>


    
    

  </div>
</body>

</html>